package com.example.ssm.a;

//高层应用类

public class Business {

    //高层应用类 Business 底层模块类 FloppyWriter/UsbWriter 谁依赖谁？（高层依赖底层） 谁有控制权？（底层）

   /* private FloppyWriter floppyWriter;

    public void saveData(){
        this.floppyWriter.saveDataToFloppy();
    }

    public void setFloppyWriter(FloppyWriter floppyWriter){
        this.floppyWriter = floppyWriter;
    }

    */
   private UsbWriter usbWriter;

    public void saveData() {
        this.usbWriter.saveDataToUsb();
    }

    public void setUsbWriter(UsbWriter usbWriter) {
        this.usbWriter = usbWriter;
    }
}
